/**
 * @Author: 张兴
 * @Date: 2019/6/20
 * @Last Modified by:   张兴
 * @Last Modified time: 2019-09-12 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// index查询 全部状态
export const getmaintain = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getmaintain`, { params });
// index查询 未上传状态
export const getmaintainWSC = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getmaintainWSC`, { params });
// index查询 已上传状态
export const getmaintainYSC = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getmaintainYSC`, { params });
// 删除
export const delectMaintain = params => axios.delete(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/delectMaintain`, { params });
// 查询  申请单号  的  前缀 和 流水号
export const insertRepaiOrder = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/insertRepaiOrder`, { params });
// 判断 申请单号  是否重复
export const getisCF = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/isCF`, { params });
// 单据状态查询
export const selectCar = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/selectCar`, { params });
// 车辆状态查询
export const selectCarType = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/selectCarType`, { params });
// 车辆信息查询
export const selectCaeDate = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/selectCaeDate`, { params });
// 新增保养单
export const addmaintain = params => axios.post(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/addmaintain`, params);
// 申请单号查询是否重复
export const selectVbillno = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/selectVbillno`, { params });
// 删除当前无效单号
export const delVbillno = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/delVbillno`, { params });

// 查询 车辆类别
export const getSelectCLLB = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getSelectCLLB`, {
    params
  });

// 上传保养单
export const upload = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/uploadBYD`, {
    params
  });
// 车系
export const getClaimSeries = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/claimSeries`, {
    params
  });
// 车型
export const getModel = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/model`, {
    params
  });
// 查询项目
export const getItem = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getItem`, { params });
// 查询备件
export const getPart = params => axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getPart`, { params });

// 查询 索赔结果 表单
export const getDateSpjg = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/maintain/ttWrMaintain/getDateSpjg`, {
    params
  });
